<?php
include('config.php');
include('classes/Text.php');
include('classes/Color.php');

$link = NewADOConnection($server['db_type']);
$link->Connect($server['server_name'],$server['mysql_username'],$server['mysql_pwd'],$server['mysql_db_name']);

include('readConfig.php');
include('comFunctions.php');

$rnd = $_REQUEST["rnd"];

$code = genRCode($rnd);

$__text			= new Text('fonts/arial.ttf','fonts/arialbd.ttf');

$__fontName 	= 'Fonts/arialbd.ttf';
$__fontSize 	= 40;
$__angle		= 0;
$__align		= 0;

header("Content-type: image/png");
$img = imagecreatefrompng("images/gfx_bg.png");
$__text->printCentered($img, imagesy($img)/2, new Color(51,102,153), $code, $__text->fontCondensedBold, $rmg = 0, $__fontSize);
imagepng($img);
imagedestroy($img);

?>
